VersionsRepo

interface VersionsRepo<T> : Repo

This interface has been created due to requirement to work with different versions of databases and make some migrations between versions

Parameters

T

It is a type of database, which will be used by this repo to retrieve current table version and update it

Functions

setTableVersion
Link copied to clipboard
common
abstract suspend fun setTableVersion(tableName: String, version: Int, onCreate: suspend T.() -> Unit = {}, onUpdate: suspend T.(from: Int, to: Int) -> Unit = { _, _ ->})

By default, instance of this interface will check that version of table with name tableName is less than version or is absent

Inheritors

StandardVersionsRepo
Link copied to clipboard